﻿using System;
using System.Linq;
using AccessControl.Common;
using AccessControl.DataAcess;


namespace AccessControl.Business
{
    public class GuestBusiness
    {
        public static AccessControlDS.tblGuestDataTable SelectAll()
        {
            return GuestAccess.SelectAll();
        }

        public static AccessControlDS.tblGuestDataTable SelectByFilter(string filter)
        {
            return GuestAccess.SelectByFilter(filter);
        }

        public static void Insert(AccessControlDS.tblGuestRow row)
        {
            GuestAccess.Insert(row);
            //Delete all existing PersonEvents
            PersonEventBuisness.DeleteByFKPerson(row.fkPerson);
        }

        public static void Update(AccessControlDS.tblGuestRow row)
        {
            GuestAccess.Update(row);
        }

        public static void Delete(AccessControlDS.tblGuestRow row)
        {
            GuestAccess.Delete(row);
        }
    }
}
